<div class="panel panel-default">
    <div class="panel-body">
        <!-- 列表项目循环体 -->
        {foreach from="$main.list" item="item" name="item"}
        <div class="row">
            <div class="col-md-12">
                <div class="panel panel-default">
                    <div class="panel-body">
                        <div class="row">
                            {if $item.cover}
                            <div class="col-sm-3 col-md-3">
                                <a class="thumbnail" href="{$item.link}" title="{$item.title|strip_tags}">
                                    <img style="width:100%;max-height:100px;background-color:#f1f1f1;"
                                        src="{if (isset($setting['cdn_speed']) && $setting.cdn_speed == '1') || !$item.cover}{else}{$item.cover}{/if}"
                                        data-src="{if $item.cover}{$item.cover}{else}{/if}"
                                        alt="{$item.title|strip_tags}"
                                        title="{$item.title|strip_tags}" />
                                </a>
                            </div>
                            {/if}
                            <div class="{if $item.cover}col-sm-9 col-md-9{else}col-sm-12 col-md-12{/if}">
                                <h2 style="margin-top: 0;">
                                    <a href="{$item.link}" title="{$item.title|strip_tags}">{$item.title}</a>
                                    {if $item.time > time() - 24 * 3600 * 3}<span class="label label-success">New</span>{/if}
                                </h2>
                                <p>{if $item.description}{$item.description|strip_tags}{else}{$item.content|strip_tags|modifier:str_replace('"', '')|modifier:preg_replace('/\\s+/sim', ' ')|modifier:mb_strimwidth(0, 140, '...', 'UTF-8')}{/if}</p>
                                <p>
                                    <a href="{$item.link}" title="Read more" rel="nofollow"
                                        class="btn btn-primary pull-right" role="button">
                                        <span class="glyphicon glyphicon-link" aria-hidden="true"></span>
                                        Read more
                                    </a>
                                    <span class="glyphicon glyphicon-time text-muted" aria-hidden="true"></span>
                                    <span class="text-muted">{$item.time|date:m/d/y}</span>
                                </p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        {foreachelse}
        <div class="row">
            <div class="col-md-12">
                <p class="text-center text-muted">还没有页面</p>
            </div>
        </div>
        {/foreach}
        <!-- 分页 -->
        {if $main.count}
        {include file='index/inc/pager.html'}
        {/if}
    </div>
</div>